﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class aspx_admin_video_view : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void gv视频中心_RowEditing(object sender, GridViewEditEventArgs e)
    {
        Response.Redirect(string.Format("edit.aspx?id={0}", this.gv视频中心.Rows[e.NewEditIndex].Cells[0].Text));
    }
    protected void gv视频中心_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int id = int.Parse(this.gv视频中心.Rows[e.RowIndex].Cells[0].Text);
        using (ds_名师讲堂TableAdapters.tb_视频TableAdapter da = new ds_名师讲堂TableAdapters.tb_视频TableAdapter())
        {
            WebHelper.FileAndDirectory.DeleteFile("~/video/" + (da.GetDataBy视频ID(id).Rows[0] as ds_名师讲堂.tb_视频Row).虚目录);
            da.Delete(id);
        }
    }
}